<#include "../../page.ftl" />
<#assign security=JspTaglibs["/WEB-INF/security.tld"] />
<table class="table table-datatable table-gray check_table">
    <thead>
    <tr>
        <th style="width: 35px;"><input id="checkAll" type="checkbox" value=""></th>
        <th>角色ID</th>
        <th>角色名称</th>
        <th>备注</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <#if rolesTable.rows??>
        <#list rolesTable.rows as role>
        <tr>
            <td><input name="ids" type="checkbox" value="${role.id?c}"></td>
            <td>${role.roleId!''}</td>
            <td>${role.roleName!''}</td>
            <td>${role.remark!''}</td>
            <td>
                <@security.authorize ifAnyGranted="ROLE_ROLE_E">
                    <a class="btn btn-green btn-radio nopadding" onclick="return popAddOrModify(${role.id?c});"
                       title="编辑"><i class="fa fa-edit"></i></a>
                </@security.authorize>
                <@security.authorize ifAnyGranted="ROLE_ROLE_ASSIGN_AUTH">
                    <a class="btn btn-green btn-radio nopadding" onclick="return popAssignAuth('${role.roleId!''}');"
                       title="分配权限"><i class="fa fa-spinner"></i></a>
                </@security.authorize>
                <@security.authorize ifAnyGranted="ROLE_ROLE_ASSIGN_MENU">
                    <a class="btn btn-green btn-radio nopadding" onclick="return popAssignMenu('${role.roleId!''}');"
                       title="分配菜单"><i class="fa fa-share-alt-square"></i></a>
                </@security.authorize>
                <@security.authorize ifAnyGranted="ROLE_ROLE_HOME_CONF">
                    <a class="btn btn-green btn-radio nopadding" onclick="return popAssignHome('${role.roleId!''}');"
                       title="首页功能配置"><i class="fa fa-soccer-ball-o"></i></a>
                </@security.authorize>
            </td>
        </tr>
        </#list>
    </#if>
    </tbody>
</table>
<#if rolesTable??>
    <@page table=rolesTable formId="search_role_table"/>
</#if>